//username 是否存在
exports.checkUsername = function(req,res,callback){
    if(req.session.username){
        callback(req.session.username)
    }else{
        res.send(`<script>alert('你登录已经失效,请重新登录');location.href='/users/login'</script>`)
    }
}